home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Headers / misckit / MiscAnnouncer.h < prev    next >
Encoding:
Text File  |  1995-07-21  |  1.5 KB  |  71 lines

  1. /*
  2.  
  3. File MiscAnnouncer.h
  4.  
  5. Copyright (C) 1994 by H. Scott Roy
  6.  
  7.         H. Scott Roy
  8.         2573 Stowe Ct.
  9.         Northbrook, IL  60062-8103
  10.         iconkit@cs.stanford.edu
  11.  
  12. For your editing convenience, this file is best viewed using an editor that automatically wraps long lines, in a fixed point font at 80 columns, with tabs every 4 spaces.
  13.  
  14. */
  15.  
  16.  
  17. /* ========================================================================== */
  18.  
  19.  
  20. /*
  21.  
  22. The MiscAnnouncer class is a public version of the IKAnnouncer class found in IconKit.  It provides a simple way to conform to the MiscDependency protocol.  A MiscAnnouncer lets one send announcements to notify users and listeners of changes to an object.
  23.  
  24. There are two ways to incorporate a MiscAnnouncer in a new class: one can either inherit from it directly, or else keep a MiscAnnouncer as an instance variable and forward all the MiscDependency messages.
  25.  
  26. */
  27.  
  28. #import <objc/Object.h>
  29.  
  30. #import "MiscDependency.h"
  31.  
  32.  
  33. /* ========================================================================== */
  34.  
  35.  
  36. @interface MiscAnnouncer : Object <MiscDependency>
  37. {
  38.     id
  39.         owner,
  40.         usersAndListeners;
  41.     
  42.     int
  43.         numUsers;
  44.     
  45.     BOOL
  46.         sendAnnouncements;
  47. }
  48.  
  49.  
  50. - initOwner: theOwner;
  51. - free;
  52. - usersAndListeners;
  53. - (int) numUsers;
  54. - (BOOL) sendAnnouncements;
  55. - setSendAnnouncements: (BOOL) flag;
  56.  
  57. - announce: (SEL) theMessage;
  58. - announce: (SEL) theMessage  with: theArgument;
  59. - (BOOL) poll: (SEL) theMessage;
  60. - (BOOL) poll: (SEL) theMessage  with: theArgument;
  61.  
  62.  
  63.     // -- MiscDependency methods
  64.  
  65. - addUser: who;
  66. - addListener: who;
  67. - removeUser: who;
  68. - removeListener: who;
  69.  
  70. @end
  71.